package org.raymond.icloud.modules.order.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.raymond.icloud.common.core.model.Result;
import org.raymond.icloud.modules.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "订单")
@Slf4j
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    IOrderService orderService;

    @ApiOperation(value = "创建订单")
    @PostMapping("/create")
    public Result create(){
        orderService.batchReduceStock();
        return Result.success("创建订单成功");
    }
}
